home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / WMS.CAB / wmsTabs.inc < prev    next >
Encoding:
Text File  |  2003-02-21  |  8.0 KB  |  229 lines

  1. <%
  2. '+-------------------------------------------------------------------------
  3. '
  4. '  Microsoft Windows Media
  5. '  Copyright (C) Microsoft Corporation. All rights reserved.
  6. '
  7. '  File:       Tabs.asp
  8. '
  9. '  Contents:    Draws the tabs across each of the various pages
  10. '
  11. '  Dependencies: LocStrings.asp, WMSConstants.asp
  12. '
  13. '--------------------------------------------------------------------------
  14. Dim dwTabIndex
  15. Dim bMSIE
  16.  
  17. bMSIE = CBool( brMSIE = Session( "BrowserType" ) )
  18. dwTabIndex = 1
  19.  
  20. '/////////////////////////////////////////////////////////////////
  21. Sub DrawServerTabs( strCurrTabName )
  22.     on error resume next
  23.  
  24.     Dim rgszTabNames( 4 )
  25.     Dim TabLinks( 4 )
  26.     Dim dwNumTabs
  27.     Dim dwTabID 
  28.  
  29.     rgszTabNames( 0 ) = L_MONITORTABTITLE_TEXT
  30.     rgszTabNames( 1 ) = L_ADSTABTITLE_TEXT
  31.     rgszTabNames( 2 ) = L_PROPERTIESTABTITLE_TEXT
  32.     rgszTabNames( 3 ) = L_GETSTARTEDTABTITLE_TEXT
  33.  
  34.     TabLinks(0) = "server_status.asp"
  35.     TabLinks(1) = "server_ads.asp"
  36.     TabLinks(2) = "server_props.asp"
  37.     TabLinks(3) = "server_getstarted.asp"
  38.  
  39.     dwTotalNumTabs = 4
  40. %>
  41. <!-- TABS -->
  42. <table oncontextmenu="JavaScript:event.cancelBubble=true;return false;" align="left" class="tabTable" cols="<%= dwTotalNumTabs %>" border="0" hspace="0" vspace="0" STYLE="BORDER-COLLAPSE: collapse" margin-top="0" margin-bottom="0">
  43.     <tr align="middle"><%
  44.     for dwTabID = 0 to dwTotalNumTabs - 1
  45.         bTabIsActive = CBool( 0 = StrComp( rgszTabNames( dwTabID ), strCurrTabName, vbTextCompare ) )
  46.                 
  47.         if bTabIsActive then 
  48.         %>
  49.         <td nowrap class="tabSelected" <% if FALSE = bMSIE then %> bgcolor="white"<%end if %>><span>
  50.             <center><%= " " & Server.HTMLEncode( rgszTabNames( dwTabID ) ) & " " %></center></span>
  51.         </td><%
  52.         else
  53.         %><td nowrap class="tabNotSelected" <%if FALSE = bMSIE then %> bgcolor="<%= Server.HTMLEncode( colorTabBackground ) %>"<%end if %>>
  54.             <center>
  55.             <a tabIndex="<%= dwTabIndex %>"  <% dwTabIndex = dwTabIndex + 1 %> href="<%= TabLinks( dwTabID ) %>?server=<%= RemoveDangerousCharacters( Request.QueryString("server") & "&ppID=" & szPubPointID ) %>">
  56.                 <span class="tabNotSelected">
  57.                     <%= " " & Server.HTMLEncode( rgszTabNames( dwTabID ) ) & " " %>
  58.                 </span></a>
  59.             </center>
  60.         </td><%
  61.         end if
  62.     next %>
  63.     </tr>
  64. </table><!-- /TABS --><%
  65. Response.Flush
  66. End Sub
  67.  
  68.  
  69. '/////////////////////////////////////////////////////////////////
  70. Sub DrawCacheProxyTabs( strCurrTabName )
  71.  
  72.     Dim rgszTabNames( 1 )
  73.     Dim TabLinks( 1 )
  74.     Dim dwNumTabs
  75.     Dim dwTabID 
  76.  
  77.     rgszTabNames( 0 ) = L_GETSTARTEDTABTITLE_TEXT
  78.  
  79.     TabLinks(0) = "cache_getstarted.asp"
  80.  
  81.     dwTotalNumTabs = 1
  82. %>
  83. <!-- TABS -->
  84. <table align="left" class="tabTable" cols="<%= dwTotalNumTabs %>" border="1" hspace="0" vspace="0" STYLE="BORDER-COLLAPSE: collapse" margin-top="0" margin-bottom="0">
  85.     <tr align="middle">
  86.         <% 
  87.             for dwTabID = 0 to dwTotalNumTabs - 1
  88.                 bTabIsActive = CBool( rgszTabNames( dwTabID ) = strCurrTabName )
  89.                 
  90.                 if bTabIsActive then 
  91.         %>
  92.         <td nowrap class="tabSelected" <% if FALSE = bMSIE then %> bgcolor="white"<%end if %>>
  93.             <center><%= " " & Server.HTMLEncode( rgszTabNames( dwTabID ) ) & " " %></center>
  94.         </td>
  95.         <% else %>
  96.         <td nowrap class="tabNotSelected" <%if FALSE = bMSIE then %> bgcolor="<%= Server.HTMLEncode( colorTabBackground ) %>"<%end if %>>
  97.             <center>
  98.             <a tabIndex="<%= dwTabIndex %>"  <% dwTabIndex = dwTabIndex + 1 %> href="<%= TabLinks( dwTabID ) %>?server=<%= RemoveDangerousCharacters( Request.QueryString("server") & "&ppID=" & szPubPointID ) %>">
  99.                 <span class="tabNotSelected">
  100.                     <center><%= " " & Server.HTMLEncode( rgszTabNames( dwTabID ) ) & " " %></center>
  101.                 </span></a>
  102.             </center>
  103.         </td>
  104.         <% end if %>
  105.         <% next %>
  106.     </tr>
  107. </table> <!-- /TABS --><%
  108. Response.Flush
  109. End Sub
  110.  
  111.  
  112. '/////////////////////////////////////////////////////////////////
  113. Sub DrawPubPointTabs( strCurrTabName )
  114.  
  115.     Dim dwTabID 
  116.     Dim rgszTabNames( 4 )
  117.     Dim TabLinks( 4 )
  118.  
  119.     Dim dwMonitorTabID
  120.     Dim dwMediaTabID
  121.     Dim dwAdsTabID
  122.     Dim dwPropertiesTabID
  123.     Dim dwTotalNumTabs
  124.  
  125.     dwMonitorTabID = 0
  126.     dwMediaTabID = 1
  127.     dwAdsTabID = 2
  128.     dwPropertiesTabID = 3
  129.     dwTotalNumTabs = 4
  130.  
  131.     rgszTabNames( dwMonitorTabID ) = L_MONITORTABTITLE_TEXT
  132.     rgszTabNames( dwMediaTabID ) = L_MEDIATABTITLE_TEXT
  133.     rgszTabNames( dwAdsTabID ) = L_ADSTABTITLE_TEXT
  134.     rgszTabNames( dwPropertiesTabID ) = L_PROPERTIESTABTITLE_TEXT
  135.  
  136.     TabLinks( dwMonitorTabID ) = "pubpoint_status.asp"
  137.     TabLinks( dwMediaTabID ) = "pubpoint_media.asp"
  138.     TabLinks( dwAdsTabID ) = "pubpoint_ads.asp"
  139.     TabLinks( dwPropertiesTabID ) = "pubpoint_props.asp"
  140.  
  141.     szPubPointID = RemoveDangerousCharacters( Request.QueryString("ppID") )
  142.     if( 0 = Len( szPubPointID ) ) then
  143.         szPubPointID = g_szPubPointID
  144.     end if
  145. %>
  146. <!-- TABS -->
  147. <table align="left" class="tabTable" cols="<%= dwTotalNumTabs %>" border="1" hspace="0" vspace="0" STYLE="BORDER-COLLAPSE: collapse" margin-top="0" margin-bottom="0">
  148.     <tr align="middle">
  149.         <% 
  150.             for dwTabID = 0 to dwTotalNumTabs - 1
  151.                 bTabIsActive = CBool( rgszTabNames( dwTabID ) = strCurrTabName )
  152.                 
  153.                 if bTabIsActive then 
  154.         %>
  155.         <td nowrap class="tabSelected" <% if FALSE = bMSIE then %> bgcolor="white"<%end if %>>
  156.             <center><%= " " & Server.HTMLEncode( rgszTabNames( dwTabID ) ) & " " %></center>
  157.         </td>
  158.         <% else %>
  159.         <td nowrap class="tabNotSelected" <%if FALSE = bMSIE then %> bgcolor="<%= Server.HTMLEncode( colorTabBackground ) %>"<%end if %>>
  160.             <center>
  161.             <a tabIndex="<%= dwTabIndex %>"  <% dwTabIndex = dwTabIndex + 1 %> href="<%= TabLinks( dwTabID ) %>?server=<%= RemoveDangerousCharacters( Request.QueryString("server") & "&ppID=" & szPubPointID ) %>">
  162.                 <span class="tabNotSelected">
  163.                     <%= " " & Server.HTMLEncode( rgszTabNames( dwTabID ) ) & " " %>
  164.                 </span></a>
  165.             </center>
  166.         </td>
  167.         <% end if %>
  168.         <% next %>
  169.     </tr>
  170. </table> <!-- /TABS --><%
  171. Response.Flush
  172. End Sub
  173.  
  174.  
  175. '/////////////////////////////////////////////////////////////////
  176. Sub DrawCacheProxyPubPointTabs( strCurrTabName )
  177.  
  178.     Dim dwTabID 
  179.     Dim rgszTabNames( 2 )
  180.     Dim TabLinks( 2 )
  181.  
  182.     Dim dwMonitorTabID
  183.     Dim dwPropertiesTabID
  184.     Dim dwTotalNumTabs
  185.  
  186.     dwMonitorTabID = 0
  187.     dwPropertiesTabID = 1
  188.     dwTotalNumTabs = 2
  189.  
  190.     rgszTabNames( dwMonitorTabID ) = L_MONITORTABTITLE_TEXT
  191.     rgszTabNames( dwPropertiesTabID ) = L_PROPERTIESTABTITLE_TEXT
  192.  
  193.     TabLinks( dwMonitorTabID ) = "pubpoint_status.asp"
  194.     TabLinks( dwPropertiesTabID ) = "pubpoint_props.asp"
  195.  
  196.     szPubPointID = RemoveDangerousCharacters( Request.QueryString("ppID") )
  197.     if( 0 = Len( szPubPointID ) ) then
  198.         szPubPointID = g_szPubPointID
  199.     end if
  200. %>
  201. <!-- TABS -->
  202. <table align="left" class="tabTable" cols="<%= dwTotalNumTabs %>" border="1" hspace="0" vspace="0" STYLE="BORDER-COLLAPSE: collapse" margin-top="0" margin-bottom="0">
  203.     <tr align="middle">
  204.         <% 
  205.             for dwTabID = 0 to dwTotalNumTabs - 1
  206.                 bTabIsActive = CBool( rgszTabNames( dwTabID ) = strCurrTabName )
  207.                 
  208.                 if bTabIsActive then 
  209.         %>
  210.         <td nowrap class="tabSelected" <% if FALSE = bMSIE then %> bgcolor="white"<%end if %>>
  211.             <center><%= " " & Server.HTMLEncode( rgszTabNames( dwTabID ) ) & " " %></center>
  212.         </td>
  213.         <% else %>
  214.         <td nowrap class="tabNotSelected" <%if FALSE = bMSIE then %> bgcolor="<%= Server.HTMLEncode( colorTabBackground ) %>"<%end if %>>
  215.             <center>
  216.             <a tabIndex="<%= dwTabIndex %>"  <% dwTabIndex = dwTabIndex + 1 %> href="<%= TabLinks( dwTabID ) %>?server=<%= RemoveDangerousCharacters( Request.QueryString("server") & "&ppID=" & szPubPointID ) %>">
  217.                 <span class="tabNotSelected">
  218.                     <%= " " & Server.HTMLEncode( rgszTabNames( dwTabID ) ) & " " %>
  219.                 </span></a>
  220.             </center>
  221.         </td>
  222.         <% end if %>
  223.         <% next %>
  224.     </tr>
  225. </table> <!-- /TABS --><%
  226. Response.Flush
  227. End Sub
  228. %>
  229.